.class Lcom/peptalk/client/lbs/android/GsmCell;
.super Ljava/lang/Object;
.source "GsmCell.java"

# interfaces
.implements Ljava/lang/Comparable;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Ljava/lang/Comparable",
        "<",
        "Lcom/peptalk/client/lbs/android/GsmCell;",
        ">;"
    }
.end annotation


# instance fields
.field public cid:I

.field public lac:I

.field public time:J


# direct methods
.method constructor <init>()V
    .locals 2

    .prologue
    const/4 v0, -0x1

    .line 13
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 14
    iput v0, p0, Lcom/peptalk/client/lbs/android/GsmCell;->cid:I

    .line 15
    iput v0, p0, Lcom/peptalk/client/lbs/android/GsmCell;->lac:I

    .line 16
    const-wide/16 v0, 0x0

    iput-wide v0, p0, Lcom/peptalk/client/lbs/android/GsmCell;->time:J

    .line 13
    return-void
.end method


# virtual methods
.method public compareTo(Lcom/peptalk/client/lbs/android/GsmCell;)I
    .locals 4
    .parameter "another"

    .prologue
    .line 37
    iget-wide v0, p0, Lcom/peptalk/client/lbs/android/GsmCell;->time:J

    iget-wide v2, p1, Lcom/peptalk/client/lbs/android/GsmCell;->time:J

    cmp-long v0, v0, v2

    if-nez v0, :cond_0

    .line 38
    const/4 v0, 0x0

    .line 42
    :goto_0
    return v0

    .line 39
    :cond_0
    iget-wide v0, p0, Lcom/peptalk/client/lbs/android/GsmCell;->time:J

    iget-wide v2, p1, Lcom/peptalk/client/lbs/android/GsmCell;->time:J

    cmp-long v0, v0, v2

    if-gez v0, :cond_1

    .line 40
    const/4 v0, 0x1

    goto :goto_0

    .line 42
    :cond_1
    const/4 v0, -0x1

    goto :goto_0
.end method

.method public bridge synthetic compareTo(Ljava/lang/Object;)I
    .locals 1
    .parameter

    .prologue
    .line 1
    check-cast p1, Lcom/peptalk/client/lbs/android/GsmCell;

    invoke-virtual {p0, p1}, Lcom/peptalk/client/lbs/android/GsmCell;->compareTo(Lcom/peptalk/client/lbs/android/GsmCell;)I

    move-result v0

    return v0
.end method

.method public equals(Ljava/lang/Object;)Z
    .locals 6
    .parameter "o"

    .prologue
    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 20
    if-ne p0, p1, :cond_0

    move v2, v5

    .line 27
    :goto_0
    return v2

    .line 23
    :cond_0
    instance-of v2, p1, Lcom/peptalk/client/lbs/android/GsmCell;

    if-nez v2, :cond_1

    move v2, v4

    .line 24
    goto :goto_0

    .line 26
    :cond_1
    move-object v0, p1

    check-cast v0, Lcom/peptalk/client/lbs/android/GsmCell;

    move-object v1, v0

    .line 27
    .local v1, cell:Lcom/peptalk/client/lbs/android/GsmCell;
    iget v2, p0, Lcom/peptalk/client/lbs/android/GsmCell;->cid:I

    iget v3, v1, Lcom/peptalk/client/lbs/android/GsmCell;->cid:I

    if-ne v2, v3, :cond_2

    iget v2, p0, Lcom/peptalk/client/lbs/android/GsmCell;->lac:I

    iget v3, v1, Lcom/peptalk/client/lbs/android/GsmCell;->lac:I

    if-ne v2, v3, :cond_2

    move v2, v5

    goto :goto_0

    :cond_2
    move v2, v4

    goto :goto_0
.end method

.method public hashCode()I
    .locals 3

    .prologue
    .line 31
    const/16 v0, 0x11

    .line 32
    .local v0, result:I
    mul-int/lit8 v1, v0, 0x1f

    iget v1, p0, Lcom/peptalk/client/lbs/android/GsmCell;->cid:I

    add-int/lit16 v0, v1, 0x20f

    .line 33
    mul-int/lit8 v1, v0, 0x1f

    iget v2, p0, Lcom/peptalk/client/lbs/android/GsmCell;->lac:I

    add-int v0, v1, v2

    .line 34
    return v0
.end method

.method public json(J)Lorg/json/JSONObject;
    .locals 6
    .parameter "currentTime"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lorg/json/JSONException;
        }
    .end annotation

    .prologue
    .line 47
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    .line 48
    .local v0, json:Lorg/json/JSONObject;
    const-string v1, "cid"

    iget v2, p0, Lcom/peptalk/client/lbs/android/GsmCell;->cid:I

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    .line 49
    const-string v1, "lac"

    iget v2, p0, Lcom/peptalk/client/lbs/android/GsmCell;->lac:I

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    .line 50
    const-string v1, "mcc"

    const-string v2, ""

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 51
    const-string v1, "mnc"

    const-string v2, ""

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 52
    const-string v1, "time"

    iget-wide v2, p0, Lcom/peptalk/client/lbs/android/GsmCell;->time:J

    sub-long v2, p1, v2

    const-wide/16 v4, 0x3e8

    div-long/2addr v2, v4

    invoke-virtual {v0, v1, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    .line 53
    return-object v0
.end method

.method public toString(J)Ljava/lang/String;
    .locals 5
    .parameter "currentTime"
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .prologue
    .line 60
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "deltaTime="

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-wide v1, p0, Lcom/peptalk/client/lbs/android/GsmCell;->time:J

    sub-long v1, p1, v1

    const-wide/16 v3, 0x3e8

    div-long/2addr v1, v3

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "s; "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    .line 61
    const-string v1, "cid="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget v1, p0, Lcom/peptalk/client/lbs/android/GsmCell;->cid:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "; "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    .line 62
    const-string v1, "lac="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget v1, p0, Lcom/peptalk/client/lbs/android/GsmCell;->lac:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\n"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    .line 60
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public write(Ljava/io/ByteArrayOutputStream;J)V
    .locals 5
    .parameter "baos"
    .parameter "currentTime"

    .prologue
    .line 67
    iget v1, p0, Lcom/peptalk/client/lbs/android/GsmCell;->lac:I

    shr-int/lit8 v1, v1, 0x18

    int-to-byte v1, v1

    and-int/lit16 v1, v1, 0xff

    invoke-virtual {p1, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 68
    iget v1, p0, Lcom/peptalk/client/lbs/android/GsmCell;->lac:I

    shr-int/lit8 v1, v1, 0x10

    int-to-byte v1, v1

    and-int/lit16 v1, v1, 0xff

    invoke-virtual {p1, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 69
    iget v1, p0, Lcom/peptalk/client/lbs/android/GsmCell;->lac:I

    shr-int/lit8 v1, v1, 0x8

    int-to-byte v1, v1

    and-int/lit16 v1, v1, 0xff

    invoke-virtual {p1, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 70
    iget v1, p0, Lcom/peptalk/client/lbs/android/GsmCell;->lac:I

    and-int/lit16 v1, v1, 0xff

    int-to-byte v1, v1

    invoke-virtual {p1, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 72
    iget v1, p0, Lcom/peptalk/client/lbs/android/GsmCell;->cid:I

    shr-int/lit8 v1, v1, 0x18

    int-to-byte v1, v1

    and-int/lit16 v1, v1, 0xff

    invoke-virtual {p1, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 73
    iget v1, p0, Lcom/peptalk/client/lbs/android/GsmCell;->cid:I

    shr-int/lit8 v1, v1, 0x10

    int-to-byte v1, v1

    and-int/lit16 v1, v1, 0xff

    invoke-virtual {p1, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 74
    iget v1, p0, Lcom/peptalk/client/lbs/android/GsmCell;->cid:I

    shr-int/lit8 v1, v1, 0x8

    int-to-byte v1, v1

    and-int/lit16 v1, v1, 0xff

    invoke-virtual {p1, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 75
    iget v1, p0, Lcom/peptalk/client/lbs/android/GsmCell;->cid:I

    and-int/lit16 v1, v1, 0xff

    int-to-byte v1, v1

    invoke-virtual {p1, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 77
    iget-wide v1, p0, Lcom/peptalk/client/lbs/android/GsmCell;->time:J

    sub-long v1, p2, v1

    const-wide/16 v3, 0x3e8

    div-long/2addr v1, v3

    long-to-int v0, v1

    .line 78
    .local v0, delta:I
    shr-int/lit8 v1, v0, 0x18

    int-to-byte v1, v1

    and-int/lit16 v1, v1, 0xff

    invoke-virtual {p1, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 79
    shr-int/lit8 v1, v0, 0x10

    int-to-byte v1, v1

    and-int/lit16 v1, v1, 0xff

    invoke-virtual {p1, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 80
    shr-int/lit8 v1, v0, 0x8

    int-to-byte v1, v1

    and-int/lit16 v1, v1, 0xff

    invoke-virtual {p1, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 81
    and-int/lit16 v1, v0, 0xff

    int-to-byte v1, v1

    invoke-virtual {p1, v1}, Ljava/io/ByteArrayOutputStream;->write(I)V

    .line 82
    return-void
.end method
